package com.rico.web.retrofit.controller;

import com.rico.web.retrofit.http.AliyunHttpApi;
import com.rico.web.retrofit.http.DjHttpApi;
import com.rico.web.retrofit.http.HolidayHttpApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/retrofit")
public class RetrofitController {
	
	@Autowired
	private HolidayHttpApi holidayHttpApi;
	@Autowired
	private AliyunHttpApi aliyunHttpApi;
	@Autowired
	private DjHttpApi juheHttpApi;
	
	@GetMapping("/getHolidayInfo")
	@ResponseBody
	public String getHolidayInfo(String year) {
		return holidayHttpApi.getHolidayInfo(year);
		
	}
	
	@GetMapping("/getAliyunElite")
	@ResponseBody
	public String getAliyunElite(String year) {
		return aliyunHttpApi.getAliyunElite(year);
		
	}
	
	@GetMapping("/getJuheDay")
	@ResponseBody
	public String getJuheDay(String year) {
		return juheHttpApi.calendarDay(year);
		
	}

}
